package com.geologyoa.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.geologyoa.service.SystemManager;
import com.geologyoa.service.SystemManagerImpl;

public class SearchXmqkDetailsById extends HttpServlet {

	/**
	 * Constructor of the object.
	 */
	public SearchXmqkDetailsById() {
		super();
	}

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}

	/**
	 * The doGet method of the servlet. <br>
	 *
	 * This method is called when a form has its tag value method equals to get.
	 * 
	 * @param request the request send by the client to the server
	 * @param response the response send by the server to the client
	 * @throws ServletException if an error occurred
	 * @throws IOException if an error occurred
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html");
		doPost(request, response);
	}

	/**
	 * The doPost method of the servlet. <br>
	 *
	 * This method is called when a form has its tag value method equals to post.
	 * 
	 * @param request the request send by the client to the server
	 * @param response the response send by the server to the client
	 * @throws ServletException if an error occurred
	 * @throws IOException if an error occurred
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		response.setContentType("text/html;charset=utf-8");
		response.setHeader("Cache-Control", "no-cache");
		response.setHeader("Expires", "0");
		response.setHeader("Pragma", "No-cache");
		PrintWriter out = response.getWriter();
		SystemManager sys=new SystemManagerImpl();
		String id = request.getParameter("ID");///项目ID
		//System.out.println(sys.SearchXmqkDetailsById(id));
		response.getWriter().write(sys.SearchXmqkDetailsById(id));
		//<?xml version="1.0" encoding="UTF-8"?>
		//<xmqkInfo><xmqkBaseInfo XMQK01001="432" XMQK01002="" XMQK01003="老公最好" XMQK01004="2013-06-05" XMQK01005="2012" XMQK01006="调查评价" XMQK01007="0000000" XMQK01008="111" XMQK01008Name="建设单位" XMQK01009="114" XMQK01009Name="设计单位" XMQK01010="" XMQK01011="直接委托" XMQK01012="193" XMQK01012Name="招投标单位" XMQK01013="招投标乙级" XMQK01014="乙级" XMQK01015="" XMQK01016="灾害点" XMQK01017="100.00" XMQK01018="100.00" XMQK01019="200.00" XMQK01118="2013-06-03" XMQK01119="2013-06-12" XMQK01120="验收组织部门" XMQK01121="2013-06-13" XMQK01122="" XMQK01123="" XMQK01124="主审6" XMQK01125="成员6" XMQK01126="" XMQK01127="" XMQK01128="2.00" XMQK01129="2.00" XMQK01130="2.00" XMQK01131="2.00" XMQK01132="无" XMQK01133="2.00" XMQK01134="2.00" XMQK01135="无" XMQK01136="武汉市" XMQK01137="武昌区"/><zjpfList size="2"><zjpfInfo ZJPF0101="433" ZJPF0102="432" ZJPF0103="A" ZJPF0104="2013" ZJPF0105="100.00" ZJPF0106="upload/xm/示例图片_01_1371136099710.jpg" ZJPF0107=""/><zjpfInfo ZJPF0101="434" ZJPF0102="432" ZJPF0103="A" ZJPF0104="2012" ZJPF0105="100.00" ZJPF0106="upload/xm/示例图片_02_1371136109177.jpg" ZJPF0107=""/></zjpfList><cjdwList size="5"><cjdwInfo CJDW0101="436" CJDW0102="432" CJDW0103="371" CJDW0103Name="勘查单位2" CJDW0103ZZ="乙级" CJDW0104="A" CJDW0105="公开招标" CJDW0106="193" CJDW0107="主要工作量2" CJDW0108="100.00" CJDW0109="主审2" CJDW0110="成员2" CJDW0111="" CJDW0112="upload/xm/示例图片_02_1371136507599.jpg" CJDW0113="" CJDW0114="" CJDWName="勘查单位2" CJDWZz="乙级" CJDW0106Name="招投标单位" CJDW0106ZZ="招投标乙级"/><cjdwInfo CJDW0101="435" CJDW0102="432" CJDW0103="114" CJDW0103Name="设计单位" CJDW0103ZZ="甲级" CJDW0104="C" CJDW0105="直接委托" CJDW0106="193" CJDW0107="主要工作量3" CJDW0108="100.00" CJDW0109="主审3" CJDW0110="成员3" CJDW0111="upload/xm/示例图片_04_1371136551370.jpg" CJDW0112="" CJDW0113="" CJDW0114="" CJDWName="设计单位" CJDWZz="甲级" CJDW0106Name="招投标单位" CJDW0106ZZ="招投标乙级"/><cjdwInfo CJDW0101="439" CJDW0102="432" CJDW0103="112" CJDW0103Name="施工单位" CJDW0103ZZ="甲级" CJDW0104="D" CJDW0105="公开招标" CJDW0106="193" CJDW0107="主要工作量4" CJDW0108="100.00" CJDW0109="主审4" CJDW0110="成员4" CJDW0111="" CJDW0112="upload/xm/示例图片_03_1371136575489.jpg" CJDW0113="" CJDW0114="" CJDWName="施工单位" CJDWZz="甲级" CJDW0106Name="招投标单位" CJDW0106ZZ="招投标乙级"/><cjdwInfo CJDW0101="437" CJDW0102="432" CJDW0103="113" CJDW0103Name="监理单位" CJDW0103ZZ="甲级" CJDW0104="E" CJDW0105="竞争性谈判" CJDW0106="193" CJDW0107="主要工作量5" CJDW0108="100.00" CJDW0109="主审5" CJDW0110="成员5" CJDW0111="upload/xm/示例图片_04_1371136601200.jpg" CJDW0112="" CJDW0113="" CJDW0114="" CJDWName="监理单位" CJDWZz="甲级" CJDW0106Name="招投标单位" CJDW0106ZZ="招投标乙级"/><cjdwInfo CJDW0101="438" CJDW0102="432" CJDW0103="119" CJDW0103Name="勘察单位" CJDW0103ZZ="甲级" CJDW0104="A" CJDW0105="直接委托" CJDW0106="193" CJDW0107="主要工作量1" CJDW0108="100.00" CJDW0109="主审1" CJDW0110="成员1" CJDW0111="upload/xm/示例图片_01_1371136469599.jpg" CJDW0112="" CJDW0113="" CJDW0114="" CJDWName="勘察单位" CJDWZz="甲级" CJDW0106Name="招投标单位" CJDW0106ZZ="招投标乙级"/></cjdwList></xmqkInfo>

	}

	/**
	 * Initialization of the servlet. <br>
	 *
	 * @throws ServletException if an error occurs
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}
